import pytest
from selenium import webdriver
from selenium.webdriver.chrome.options import Options


@pytest.fixture(scope='session', autouse=True)
def driver():
    driver = webdriver.Chrome()
    driver.implicitly_wait(3)
    yield driver
    driver.quit()

# @pytest.fixture(scope='session', autouse=True)
# def driver():
#     opt = webdriver.ChromeOptions()
#     opt.debugger_address = "localhost:9222"
#     driver = webdriver.Chrome(options=opt)
#
#     driver.implicitly_wait(3)
#     yield driver
#     driver.quit()

# @pytest.fixture(scope='session', autouse=True)
# def driver():
#     opt = webdriver.ChromeOptions()
#     opt.add_experimental_option('w3c', False)
#     driver = webdriver.Chrome(options=opt)
#
#     driver.implicitly_wait(3)
#     yield driver
#     driver.quit()
